package com.leilbase.oauthtest.controller;

import org.springframework.http.HttpMethod;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: sc-alibaba
 * @description: hollo测试接口
 * @author: Leil
 * @create: 2019-08-22 17:14
 */
@RestController
@RequestMapping("/hello")
public class HelloController {

    @RequestMapping("/world")
    public String helloWorld() {
        return "Hello KITTY";
    }


    @RequestMapping(value = "testDel", method = RequestMethod.GET)
//    @PreAuthorize("hasAuthority('ROLE_ADMIN')")
    public String testDel() {
        return "DELETE";
    }

}
